Skip to main content
Version: 3.x.x

RequestCurrentType


import { RequestCurrentType } from "@hyper-fetch/core"

Description

Defined in request/request.types.ts:183

Preview

type RequestCurrentType<Payload,QueryParams,GenericEndpoint,AdapterOptions,MethodsType> = { data?: PayloadType<Payload>; headers?: HeadersInit; params?: ExtractRouteParams<GenericEndpoint> | NegativeTypes; queryParams?: QueryParams | NegativeTypes; updatedAbortKey?: boolean; updatedCacheKey?: boolean; updatedEffectKey?: boolean; updatedQueueKey?: boolean; used?: boolean } & Partial<NullableKeys<RequestOptionsType<GenericEndpoint, AdapterOptions, MethodsType>>>;

Structure

{
data: Payload | \null\ | \undefined\;
headers: HeadersInit;
params: string extends T ? NegativeTypes : (T extends `${string}:,${infer Param}/,${infer Rest}` ? [k in \Param\ | \keyof ExtractRouteParams<Rest>\]: ParamType : (T extends `${string}:,${infer Param}` ? [k in Param]: ParamType : NegativeTypes)) | \null\ | \undefined\;
queryParams: QueryParams | \null\ | \undefined\;
updatedAbortKey: boolean;
updatedCacheKey: boolean;
updatedEffectKey: boolean;
updatedQueueKey: boolean;
used: boolean;
...params2: Partial<NullableKeys<RequestOptionsType<GenericEndpoint, AdapterOptions, MethodsType>>>;
}